<!DOCTYPE html>
<html>
<head>
    <title>处理结果</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-5">
        <h1>文件处理结果</h1>
        
        <div class="mt-4">
            <h3>标记后的数据</h3>
            {{ df_html|safe }}
        </div>
        
        <div class="mt-4">
            <h3>统计结果</h3>
            {{ stats_html|safe }}
        </div>
        
        <div class="mt-4">
            <a href="{{ url_for('download_file', file_id=file_id, filename=download_filename) }}" 
               class="btn btn-success">下载处理后的文件</a>
            <a href="{{ url_for('upload_file') }}" class="btn btn-secondary ms-2">返回上传</a>
        </div>
    </div>
</body>
</html>